import { TypeOrmModule } from "@buildingai/db/@nestjs/typeorm";
import { User } from "@buildingai/db/entities/user.entity";
import { PublicUserService } from "@buildingai/extension-sdk/services/user.service";
import { Module } from "@nestjs/common";

import { Article } from "../../db/entities/article.entity";
import { CategoryModule } from "../category/category.module";
import { ArticleController } from "./controllers/console/article.controller";
import { ArticleWebController } from "./controllers/web/article.web.controller";
import { ArticleService } from "./services/article.service";

@Module({
    imports: [TypeOrmModule.forFeature([Article, User]), CategoryModule],
    controllers: [ArticleController, ArticleWebController],
    providers: [ArticleService, PublicUserService],
    exports: [ArticleService],
})
export class ArticleModule {}
